package com.woniuxy.feign.hystrix;

import com.woniuxy.feign.OrderFeign;
import com.work.framework.pojo.ResultDTO;
import org.springframework.stereotype.Component;

import java.math.BigDecimal;

/**
 * @Author: wanghao
 * @Date: 2019/9/19 15:48
 *
 * order模块熔断器
 */
@Component
public class OrderHystrix implements OrderFeign {
    /**
     * 远程调用订单模块的方法扣除押金
     * @param uid
     * @param money
     * @return
     */
    @Override
    public Integer chargeMoney(Integer uid, BigDecimal money) {
        System.out.println("调用订单模块的方法扣除押金失败！！！！");
        return 500;
    }
    /**
     * 远程调用订单模块的方法退还押金
     * @param uid
     * @param money
     * @return
     */
    @Override
    public Integer addMoney(Integer uid, BigDecimal money) {
        System.out.println("调用订单模块的方法退还押金失败！！！！");
        return 500;
    }

    /**
     * 生成订单远程调用失败
     * @param bid
     * @param gid
     * @param transacPrice
     * @return
     */
    @Override
    public Integer addOrder(Integer bid, Integer gid, BigDecimal transacPrice) {
        System.out.println("生成订单远程调用失败！！！！");
        return 500;
    }
}
